/**
 * @Description:
 * @Author BPF
 * @create 2021/9/1 11:20
 */
import { DELETE, GET, POST } from '@/api/helper'

const common_api_prefix = window.$config.proxy.common_api_prefix.prefix
export default {
  /**
   * 授权码登录，获取token
   * */
  authLoginByCode(body = { params: {}, data: {}, headers: {} }) {
    return GET({ url: common_api_prefix + '/auth/oauth/token', ...body })
  },

  /**
   * 根据token拉取用户信息
   * */
  authGetUserInfo(body = { params: {}, data: {}, headers: {} }) {
    return GET({ url: common_api_prefix + '/metadata/v1/system/user/getInfo', ...body })
  },

  /**
   * 退出登录
   * */
  authTokenLogout(body = { params: {}, data: {}, headers: {} }) {
    return DELETE({ url: common_api_prefix + '/auth/token/logout', ...body })
  }
}
